Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRG: Make use of AssociatedEmptyRoom field in *_meg.json #795

Merged
merged 13 commits into from
May 7, 2021

Conversation

hoechenberger
Copy link
Member

Fixes #493.

write_raw_bids gains a new parameter, empty_room, which allows users to specify an empty-room recording that belongs to the experimental MEG data. This information is stored in the AssociatedEmptyRoom field in the *_meg.json sidecar file.

BIDSPath gained an empty_room property that parses the sidecar and returns a BIDSPath to the empty-room recording. If no AssociatedEmptyRoom key is found in the sidecar, an error message is emitted, suggesting users may wish to use BIDSPath.find_empty_room() instead, which will try to find the "best-matching" empty-room recording based on session date.

Would like to hear your thought on the API.

cc @agramfort @sappelhof

x-ref bids-standard/bids-specification#790 -> the BIDS specs are unclear, and I'm now just going ahead here with an implementation, also with the idea to provide something that "works in real-life" before trying to push the BIDS discussion forward again.

Merge checklist

Maintainer, please confirm the following before merging:

  • All comments resolved
  • This is not your own PR
  • All CIs are happy
  • PR title starts with [MRG]
  • whats_new.rst is updated
  • PR description includes phrase "closes <#issue-number>"

mne_bids/path.py Outdated Show resolved Hide resolved
mne_bids/path.py Outdated Show resolved Hide resolved
mne_bids/write.py Outdated Show resolved Hide resolved
mne_bids/write.py Outdated Show resolved Hide resolved
mne_bids/write.py Outdated Show resolved Hide resolved
@hoechenberger hoechenberger changed the title WIP: Make use of AssociatedEmptyRoom field in *_meg.json MRG: Make use of AssociatedEmptyRoom field in *_meg.json May 6, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 6, 2021

Codecov Report

Merging #795 (00c48b9) into main (d1fb506) will decrease coverage by 0.10%.
The diff coverage is 90.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #795      +/-   ##
==========================================
- Coverage   94.25%   94.14%   -0.11%     
==========================================
  Files          23       23              
  Lines        2974     3004      +30     
==========================================
+ Hits         2803     2828      +25     
- Misses        171      176       +5     
Impacted Files Coverage Δ
mne_bids/write.py 96.54% <82.60%> (-0.56%) ⬇️
mne_bids/path.py 97.00% <100.00%> (-0.10%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1fb506...00c48b9. Read the comment docs.

@agramfort agramfort merged commit e05fa2f into mne-tools:main May 7, 2021
@agramfort
Copy link
Member

thx @hoechenberger !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make use of AssociatedEmptyRoom field in *_meg.json
3 participants